package com.kws.merchant.domain;


import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Date;
import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 运维-巡检管理(OperationPolling)表实体类
 *
 * @author yxy
 * @since 2024-10-28 11:32:39
 */
@Data
@ApiModel("运维-巡检管理")
@TableName(value = "tb_operation_polling")
public class OperationPolling extends Model<OperationPolling> implements Serializable {
    private static final long serialVersionUID = -12716978905537147L;

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("$column.comment")
    private Long id;

    @ApiModelProperty("项目")
    private Long itemId;
    @ApiModelProperty("项目名称")
    @TableField(exist = false)
    private String itemName;

    @ApiModelProperty("巡检设备")
    @TableField(exist = false)
    private List<OperationPollingDevice> PollingDevices;

    @ApiModelProperty("周期")
    private Integer period;

    @ApiModelProperty("地点")
    private String site;

    @ApiModelProperty("巡检编号")
    private String pollingNo;

    @ApiModelProperty("巡检人员")
    private Long pollingUserId;

    @ApiModelProperty("巡检人员姓名")
    @TableField(exist = false)
    private String pollingUserName;

    @ApiModelProperty("巡检状态0已完成 1待完成")
    private Integer status;

    @ApiModelProperty("巡检时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    private Date pollingTime;

    @ApiModelProperty("巡检结果0正常 1异常")
    private Integer pollingResult;

    @ApiModelProperty("下次巡检人员")
    private Long nextPollingUser;

    @ApiModelProperty("下次巡检人员名称")
    @TableField(exist = false)
    private String nextPollingUserName;

    @ApiModelProperty("下次巡检时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    private Date nextPollingTime;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    @ApiModelProperty("创建时间")
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    @ApiModelProperty("修改时间")
    private Date updateTime;

    @ApiModelProperty("商家id")
    private Long merchantId;
}
